#ifndef _DRV_SPI_H
#define _DRV_SPI_H
#include "sys.h"
#include "define.h"
//#include "drv_delay.h"

#define SPI_TRANS_DMA

void spi1_init(void);
void spi_dma_read_config(uint32_t per_addr,uint32_t mem_addr, uint32_t length);
void spi_dma_write_config(uint32_t per_addr,uint32_t mem_addr, uint32_t length);

uint8_t spi_byte_write(uint8_t data);
void spi_bytes_read(uint8_t *pbuffer, uint32_t length);
void spi_bytes_write(uint8_t *pbuffer, uint32_t length);



#endif


